<?php
	//timer pengecekan load page...
	include("timer.php");
	$_start_timer = get_microtime();

	require_once("protect1.php"); 
	require_once("connect.php");
	require_once("settings.php");

	$pdo->query("USE uwika_krs");

	$_kodemk = $_GET["kodemk"];

	$sql = "delete from registrasi WHERE nrp = :nrp and kodemk = :kodemk and periode = :periode and sesi = :sesi";
	$stmt = $pdo->prepare($sql);
	$stmt->execute(array(':nrp' => $reg_uname
							,':kodemk' => $_kodemk
							,':periode' => $_global_settings['tahun_ajaran']->value
							,':sesi' => $_global_settings['semester']->value))
	or die("ERROR: " . implode(":", $stmt->errorInfo()));
	$host  = $_SERVER['HTTP_HOST'];
	$uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
	$extra = 'viewkrs.php';
	header("Location: http://$host$uri/$extra");
	?>
		<meta http-equiv="refresh" content="0; url=<?php echo $extra; ?>">
		Klik <a href="<?php echo $extra; ?>">disini</a> apabila browser anda berhenti berjalan ...
